Skip to content

fix: add use strict and use warnings to Makefile.PL#264

Draft
toddr-bot wants to merge 1 commit intomainfrom
koan.toddr.bot/strict-warnings-makefile-pl
Draft

fix: add use strict and use warnings to Makefile.PL#264
toddr-bot wants to merge 1 commit intomainfrom
koan.toddr.bot/strict-warnings-makefile-pl

Conversation

@toddr-bot
Copy link
Copy Markdown
Collaborator

@toddr-bot toddr-bot commented Apr 15, 2026

What

Add use strict and use warnings to both Makefile.PL and Expat/Makefile.PL.

Why

These are the only Perl files in the distribution still missing strict/warnings. The top-level Makefile.PL used bare package globals ($expat_libpath, $expat_incpath) — declaring them as lexicals catches typos and scoping issues at compile time.

How

  • Added use strict; use warnings; to both files
  • Changed $expat_libpath/$expat_incpath from bare globals to my variables in the top-level Makefile.PL (Expat/Makefile.PL already used my)

Testing

  • perl Makefile.PL succeeds (both levels)
  • make test — all tests pass
  • make disttest — verified separately

🤖 Generated with Claude Code


Quality Report

Changes: 2 files changed, 6 insertions(+), 2 deletions(-)

Code scan: clean

Tests: passed (OK)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

Both Makefile.PL and Expat/Makefile.PL lacked strict and warnings
pragmas. The top-level Makefile.PL also used bare package globals
($expat_libpath, $expat_incpath) instead of lexical variables.

- Add 'use strict' and 'use warnings' to both files
- Convert package globals to lexical (my) variables in Makefile.PL
  (Expat/Makefile.PL already used 'my')

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.73%. Comparing base (45216a7) to head (fa3f1fa).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #264   +/-   ##
=======================================
  Coverage   75.73%   75.73%           
=======================================
  Files           1        1           
  Lines        1092     1092           
  Branches      342      342           
=======================================
  Hits          827      827           
  Misses         59       59           
  Partials      206      206           
Flag Coverage Δ
perl 75.73% <ø> (ø)
xs 75.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant